import {ethers} from "ethers"

const ALCHEMY_MAINNET_URL = 'https://eth-mainnet.g.alchemy.com/v2/mkM5-GVJCs00ghRsjT7aU';
const provider = new ethers.JsonRpcProvider(ALCHEMY_MAINNET_URL)
// 目标合约地址: Arbitrum ERC20 bridge（主网）
const addressBridge = '0x8315177aB297bA92A06054cE80a67Ed4DBd7ed3a' // DAI Contract
// 合约所有者 slot
const slot = `0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103`

const privateData = await provider.getStorage(addressBridge, slot)
console.log(privateData)
// dataSlice 按字节进行截取，十六进制字符串每两个字符表示一个字节
console.log(ethers.dataSlice(privateData, 12))
console.log(ethers.getAddress(ethers.dataSlice(privateData, 12)))

